<template>
    <div class="container" :style="'min-height: '+docheight+'px'">
      <div v-if="!showTimeOut&&showCont">
        <div class="formCont">
            <div class="formHead">
                <div>下单信息</div>
            </div>
            <div class="formList">
                <div class="formItem">
                    <van-field
                        v-model="activeCoupon"
                        is-link
                        readonly
                        label="优惠券"
                        placeholder="请选择优惠券"
                        @click="checkCouponFn"
                    />
                    <van-popup v-model:show="showCoupon" round position="bottom">
                        <div class="delMask">
                            <div class="couponTitle">可用优惠券列表({{ orderInfo.user_coupon.length }})</div>
                            <div class="couponList">
                                <div class="couponItem" :key="index" v-for="(item,index) in orderInfo.user_coupon">
                                    <div class="couponLeft">
                                        <span class="couponPrice">{{ item.reduce }}</span>
                                        <span class="couponRule">元</span>
                                    </div>
                                    <div class="couponRight">
                                        <div class="couponFull">满{{ item.full }}可使用</div>
                                        <div class="couponTime">有效期至：{{ item.expiration_time }}</div>
                                    </div>
                                    <div @click="couponFn(item)" :class="user_coupon_id==item.user_coupon_id?'isCheck checkBox iconfont icon-gouxuan1':'checkBox iconfont icon-gouxuan1'"></div>
                                </div>
                                <nodata v-if="orderInfo.user_coupon.length==0" text="暂无可用优惠券~"></nodata>
                            </div>
                            <saveBtn color="#6d94f8" value="不使用优惠券" @saveClick="clearCoupon"></saveBtn>
                        </div>
                    </van-popup>
                </div>
                <div>
                    <div class="formItem">
                        <van-field
                            v-model="info.delivery_city"
                            is-link
                            readonly
                            label="所在城市"
                            placeholder="请选择所在城市"
                            @click="showCity = true"
                        />
                        <van-popup v-model:show="showCity" round position="bottom">
                            <div class="maskCont">
                                <div class="maskHead">选择所在城市</div>
                                <div class="maskSelect">
                                    <van-area @change="cityChangeFn" confirm-button-text="" cancel-button-text="" :area-list="areaList" />
                                </div>
                                <div class="maskBtn" @click="childAddressSureFn">确认选择</div>
                            </div>
                        </van-popup>
                    </div>
                    <div class="formItem">
                        <van-field maxlength="20" label="详细地址" v-model="info.delivery_address" placeholder="请输入详细地址" />
                    </div>
                    <div class="formItem">
                        <van-field maxlength="10" label="联系姓名" v-model="info.user_name" placeholder="请输入联系姓名" />
                    </div>
                    <div class="formItem">
                        <van-field maxlength="11" label="联系电话" v-model="info.user_phone" placeholder="请输入联系电话" />
                    </div>
                    <div class="formItem" v-if="goods_type==2">
                        <van-field
                            v-model="info.delivery_time"
                            is-link
                            readonly
                            label="预约时间"
                            placeholder="请选择预约时间"
                            @click="showTime = true"
                        />
                        <van-popup v-model:show="showTime" round position="bottom">
                            <div class="delMask">
                                <div class="dateCheck">
                                    <div :class="activeDate==item.date?'dateActive dateCheckItem':'dateCheckItem'" @click="dateFn(item,index)" :key="index" v-for="(item,index) in dateArr">
                                        <div class="weekVal">{{ item.dayOfWeek }}</div>
                                        <div>{{ item.date }}</div>
                                    </div>
                                </div>
                                <div class="timeCont">
                                    <div :class="index%4==0?'timeItem noLeft':'timeItem'" :key="index" v-for="(item,index) in timeArr">
                                        <div @click="timeFn(item)" :class="activeTime==item?'activeTimeMain timeItemMain':'timeItemMain'">
                                            <span>{{ item }}</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="noTime" v-if="timeArr.length==0">今日暂无可预约时间,请选择其他时间～</div>
                                <saveBtn color="#6d94f8" value="确认选择" @saveClick="saveTime"></saveBtn>
                            </div>
                        </van-popup>
                    </div>
                    <div class="formItem noBorder">
                        <van-field
                            rows="4"
                            label="订单备注"
                            autosize
                            v-model="info.order_remark"
                            type="textarea"
                            maxlength="150"
                            placeholder="若有其他需求，请备注。（例如：可提前来，请尽快联系我，来之前打电话）"
                            show-word-limit
                        />
                    </div>
                </div>
                <div class="goodsItem" :key="index" v-for="(item,index) in orderInfo.goods_info">
                    <div class="goodsImg">
                        <img :src="item.goods_image+ossSrc">
                    </div>
                    <div class="goodsInfo">
                        <div class="goodsName">{{ item.goods_name }}</div>
                        <div class="goodsType">
                            <div class="goodsTypeItem">商品数量：x{{ item.num }}</div>
                        </div>
                        <div class="goodsInfoPrice">
                            <div>单价：{{ item.goods_price }}元</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ctrlCont">
            <div class="sumCont" v-if="orderInfo.is_member==1">
                <div class="sum_price">合计：￥<span style="font-size: 1.1rem">{{ noRemenMoney.toFixed(2) }}</span>
                </div>
            </div>
            <div class="sumCont" v-if="orderInfo.is_member==2">
                <div class="sum_price">SVIP：￥<span style="font-size: 1.1rem">{{ endMony.toFixed(2) }}</span>
                </div>
                <div class="oldPrice">￥{{ noRemenMoney.toFixed(2) }}</div>
            </div>
            <div class="rightBtn" @click="sureOrderFn">立即购买</div>
        </div>
      </div>
      <toast v-model="showToast" position="middle" width="50%" type="text" :time="1000">{{showText}}</toast>
      <getLoad v-if="!showCont"></getLoad>
      <sub-load v-if="showLoad"></sub-load>
      <getTimeOut v-if="showTimeOut"></getTimeOut>
    </div>
  </template>
  
  <script>
  
  import {orderSubShow,orderSave} from "@/http/api";
  import WeixinJSBridge from 'weixin-js-sdk'
  import getLoad from '@/components/public/getLoad'
    import getTimeOut from '@/components/public/getTimeOut'
    import saveBtn from '@/components/public/saveBtn.vue'
    import { Toast } from 'vux'
    import subLoad from '@/components/public/subLoad.vue'
    import nodata from '@/components/public/nodata'
    import { areaList } from '@vant/area-data';

    export default {
      components: {nodata,subLoad,Toast,getLoad,getTimeOut,saveBtn},
      data() {
        return {
          showTimeOut:false,
          showCont:false,
          showText:'',
          areaList:areaList,
          showToast:false,
          info:{
            package_id:this.$route.query.package_id,
            delivery_address:'',
            delivery_city:'',
            user_name:'',
            user_phone:'',
            delivery_time:'',
            order_remark:'',
          },
          cityVal:'',
          showTime:false,
          timeArr:[],
          activeDate:'',
          activeTime:'',
          orderInfo:{},
          showLoad:false,
          showCoupon:false,
          showCity:false,
          chosenCoupon:-1,
          activeCoupon:'',
          user_coupon_id:-1,
          user_coupon_item:{},
          endMony:0,
          noRemenMoney:0,
          goods_save:[],
          goods_type:this.$route.query.goods_type,
        }
      },
      props: {},
      methods:{
        sureOrderFn(){
            this.sureMask()
        },
        checkCouponFn(){
            this.showCoupon = true
        },
        cityChangeFn(selectedValues, selectedOptions, selectedIndexes, columnIndex){
            if(selectedOptions.length>0){
                this.info.delivery_city = ''
                for(let i = 0; i < selectedOptions.length; i++){
                    this.info.delivery_city+=selectedOptions[i].name
                }
            }
        },
        childAddressSureFn(){
            if(this.info.delivery_city == ''){
                this.info.delivery_city= '北京市北京市东城区'
            }
            this.showCity = false
        },
        sureMask(){
            let data = {
                goods_save:this.goods_save,
                delivery_city:this.info.delivery_city,
                delivery_address:this.info.delivery_address,
                user_name:this.info.user_name,
                user_phone:this.info.user_phone,
                delivery_time:this.info.delivery_time,
                order_remark:this.info.order_remark,
                user_coupon_id:this.user_coupon_id>-1?this.user_coupon_id:'',
                goods_cart_ids:this.$route.query.cartIds,
            }
            if(data.delivery_city==''){
                this.showToast = true
                this.showText = '请输入所在城市'
                return false
            }else if(data.delivery_address.length<=2){
                this.showToast = true
                this.showText = '请输入详细地址'
                return false
            }else if(data.user_name.length==''){
                this.showToast = true
                this.showText = '请输入联系姓名'
                return false
            }else if(!this.$converData.checkPhone(data.user_phone)){
                this.showToast = true
                this.showText = '请输入正确电话'
                return false
            }else if(!data.delivery_time&&this.goods_type==2){
                this.showToast = true
                this.showText = '请选择预约时间'
                return false
            }
            if(!this.showLoad){
                this.showLoad = true
                orderSave(data).then((res)=>{
                    if(res.data.code==1){
                        WeixinJSBridge.invoke('getBrandWCPayRequest', {
                            appId: res.data.data.appId,   //公众号ID，由商户传入    
                            timeStamp: res.data.data.timeStamp,   //时间戳，自1970年以来的秒数    
                            nonceStr: res.data.data.nonceStr,      //随机串    
                            package: res.data.data.package,
                            signType: res.data.data.signType,     //微信签名方式：    
                            paySign: res.data.data.paySign, //微信签名
                        },
                        (resData)=>{
                            if (resData.err_msg == "get_brand_wcpay_request:ok") {
                                // 使用以上方式判断前端返回,微信团队郑重提示：
                                //res.err_msg将在用户支付成功后返回ok，但并不保证它绝对可靠。
                                this.showToast = true
                                this.showText = '支付成功'
                                setTimeout(()=>{
                                    this.$router.replace({path:'/order'})
                                },1000)
                            }else{
                                this.showToast = true
                                this.showText = '支付失败'
                            }
                        })
                    }else{
                        this.showToast = true
                        this.showText = res.data.msg
                    }
                this.showLoad = false
                }).catch((err)=>{
                    console.log(err)
                    this.showLoad = false
                    this.showToast = true
                    this.showText = '网络请求超时'
                })
            }
        },
        setAllMoney(){
            this.endMony = this.orderInfo.order_total_price
            if(this.user_coupon_id>-1){
                this.endMony = Number(this.endMony)-Number(this.user_coupon_item.reduce)
            }
            this.noRemenMoney = this.endMony
        },
        clearCoupon(){
            this.user_coupon_item = {}
            this.user_coupon_id = -1
            this.activeCoupon = '暂无可用优惠券'
            this.showCoupon = false
            this.setAllMoney()
        },
        couponFn(item){
            this.user_coupon_item = item
            this.user_coupon_id = item.user_coupon_id
            this.activeCoupon = '-'+item.reduce
            this.showCoupon = false
            this.setAllMoney()
        },
        onChange(index){
            this.showCoupon = false;
            this.chosenCoupon = index;
        },
        navFn(item){
            this.info.order_type = item.id
            this.setAllMoney()
        },
        getData(){
            let data ={
                goods_save:this.goods_save,
            }
            orderSubShow(data).then((res)=>{
                if(res.data.code==1){
                    this.orderInfo = res.data.data
                    // this.orderInfo.delivery_price=8
                    this.setAllMoney()
                    // this.activeDate = res.data.data.appointment_time[0].date
                    this.activeCoupon = res.data.data.user_coupon.length>0?res.data.data.user_coupon.length+'张可使用':'暂无可用优惠券'                
                    this.carMoney = res.data.data.delivery_price==0?'免费配送':res.data.data.delivery_price+'元'        
                    if(res.data.data.user_order_address){
                        let address = res.data.data.user_order_address
                        this.info.delivery_address = address.delivery_address
                        this.info.delivery_city = address.delivery_city
                        this.info.user_name = address.user_name
                        this.info.user_phone = address.user_phone
                    }
                }else{
                    this.showToast = true
                    this.showText = res.data.msg
                }
                this.showCont = true
            }).catch((err)=>{
                console.log(err)
                this.showCont = true
                this.showTimeOut = true
            })
        },
        saveTime(){
            let currentDate = new Date();
            let n = currentDate.getFullYear()
            this.info.delivery_time=n+'-'+this.activeDate+' '+this.activeTime
            this.showTime= false
        },
        getTime(){
            const currentDate = new Date();

            // 存储结果的数组
            const weekDates = [];

            // 星期几的中文格式化选项
            const dayOfWeekOptions = { weekday: 'long', era: 'short' };
            // 日期的中文格式化选项
            const dateOptions = { month: 'long', day: 'numeric' };

            // 循环获取接下来一周的日期
            for (let i = 0; i < 7; i++) {
                // 获取日期
                let date = new Date(currentDate);
                date.setDate(currentDate.getDate() + i);

                // 格式化日期和星期几为中文
                let formatterDayOfWeek = new Intl.DateTimeFormat('zh-CN', dayOfWeekOptions);
                let formatterDate = new Intl.DateTimeFormat('zh-CN', dateOptions);

                let formattedDayOfWeek = formatterDayOfWeek.format(date);
                let formattedDate = formatterDate.format(date);
                formattedDate = formattedDate.split('月')[0]+'-'+formattedDate.split('月')[1].split('日')[0]
                if(i==0){
                    formattedDayOfWeek = '公元 今天'
                    this.activeDate = formattedDate
                }else if(i==1){
                    formattedDayOfWeek = '公元 明天'
                }
                // 将日期和星期几添加到结果数组
                weekDates.push({
                    date: formattedDate,
                    dayOfWeek: formattedDayOfWeek.split(' ')[1],
                });
            }
            this.dateArr = weekDates
            this.getHalfHourlyTimePoints(0)
        },
        getHalfHourlyTimePoints(index) {
            let currentTime = new Date();
            const endOfDay = new Date(currentTime);
            if(index!=0){
                endOfDay.setHours(23, 0, 0, 0);
                currentTime = new Date(currentTime.setHours(8, 0, 0, 0))
            }else{
                let passTime = new Date(new Date(currentTime).setHours(8, 0, 0, 0))
                if(currentTime<passTime){
                    currentTime = new Date(currentTime.setHours(8, 0, 0, 0))
                }
                endOfDay.setHours(23, 30, 0, 0);
            }
            // 设置当天22:00的时间
            // 存储结果的数组
            const roundedHalfHourlyTimePoints = [];

            // 循环生成时间点，每隔30分钟
            while (currentTime <= endOfDay) {
                // 获取分钟数并确保为30的倍数
                const minutes = Math.floor(currentTime.getMinutes() / 30) * 30;
                // 格式化小时和分钟，保证单个数字的小时和分钟前面加0
                const formattedHour = currentTime.getHours().toString().padStart(2, '0');
                const formattedMinute = minutes.toString().padStart(2, '0');

                // 将时间点加入数组
                roundedHalfHourlyTimePoints.push(`${formattedHour}:${formattedMinute}`);

                // 增加30分钟
                currentTime.setMinutes(currentTime.getMinutes() + 30);
            }
            roundedHalfHourlyTimePoints.splice(0,2)
            this.activeTime = roundedHalfHourlyTimePoints[0]
            this.timeArr =  roundedHalfHourlyTimePoints
        },
        dateFn(item,index){
            this.getHalfHourlyTimePoints(index)
            this.activeDate = item.date
        },
        timeFn(item){
            this.activeTime = item
        },
      },
      mounted(){
      },
      created() {
        console.log(JSON.parse(this.$route.query.goods_save))
        this.goods_save = JSON.parse(this.$route.query.goods_save)
        this.getTime()
        this.getData()
      },
    }
  </script>
  
  <style scoped lang="less">
  .container{
    width: 100%;
    background-color: #edf2ff;
    padding-top: 1rem;
    padding-bottom: 3.75rem;
    box-sizing: border-box;
    .formCont{
      width: 92%;
      margin: 0 auto;
      padding: 1rem 4% 0.5rem;
      border-radius: 0.25rem;
      background-color: #fff;
      box-sizing: border-box;
      .formHead{
        font-size: 0.75rem;
        font-weight: bold;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
      }
      .formList{
        width: 100%;
        .navCont{
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            .navItem{
                background-color: #edf2ff;
                padding: 0.75rem 0;
                box-sizing: border-box;
                width: 48%;
                border-radius: 0.75rem;
                text-align: center;
                img{
                    height: 2.5rem;
                    margin-bottom: 0.25rem;
                }
            }
            .navActive{
                background-color: #6d94f8;
                color: white;
            }
        }
        .formItem{
          padding: 0.25rem 0;
          width: 100%;
          display: flex;
          position: relative;
          border-bottom: 1px solid rgb(245,245,245);
          .formName{
              width: 4rem;
              font-size: 0.7rem;
              color: #646566;
              margin-right: 0.75rem;
              box-sizing: border-box;
          }
          .delMask{
            padding: 0.75rem;
            box-sizing: border-box;
            .dateCheck{
                background-color: #fff;
                width: 100%;
                padding: 0.5rem 0;
                box-sizing: border-box;
                font-size: 0.6rem;
                box-sizing: border-box;
                // justify-content: space-between;
                overflow-x: auto;
                white-space: nowrap;
                .dateCheckItem{
                    display: inline-block;
                    white-space: nowrap;
                    border-radius: 0.25rem;
                    padding:0.35rem 0.7rem;
                    box-sizing: border-box;
                    position: relative;
                    margin-right: 4%;
                    border:1px solid #6d94f8;
                    color: #6d94f8;
                    text-align: center;
                    .weekVal{
                        font-size: 0.8rem;
                        margin-bottom: 0.25rem;
                    }
                }
                .dateActive{
                    background-color: #6d94f8;
                    color: #fff;
                }
            }
            .noTime{
                color: #666;
                text-align: center;
                margin-bottom: 1rem;
            }
            .timeCont{
                display: flex;
                flex-wrap: wrap;
                max-height: 15rem;
                overflow-y: auto;
                box-sizing: border-box;
                margin-top: 0.75rem;
                margin-bottom: 0.75rem;
                .timeItem{
                    width: 22%;
                    margin-left: 4%;
                    box-sizing: border-box;
                    text-align: center;
                    .timeItemMain{
                        background-color: #f7f7f7;
                        border: 1px solid #f7f7f7;
                        width: 100%;
                        padding: 0.75rem 0;
                        box-sizing: border-box;
                        border-radius: 0.25rem;
                        margin-bottom: 0.75rem;
                        position: relative;
                        overflow: hidden;
                        .disTag{
                            width: 100%;
                            height: 100%;
                            position: absolute;
                            left: 0;
                            top: 0;
                            background-color: rgba(255,255,255,0.5);
                            text-align: right;
                            display: flex;
                            justify-content: flex-end;
                            .disTagText{
                                transform: scale(0.7);
                                color: #6d94f8;
                                position: relative;
                                top: -0.3rem;
                                left: 0.2rem;
                            }
                        }
                        .fullTag{
                            position: absolute;
                            right: 0;
                            top: 0;
                            padding: 0.05rem 0.15rem;
                            font-size: 0.6rem;
                            // background-color: #ebebeb;
                        }
                    }
                    .bindTime{
                        background-color: #ebebeb;
                        border: 1px solid #ebebeb;
                        color: #666;
                    }
                    .activeTimeMain{
                        border: 1px solid #6d94f8;
                        background-color: #6d94f8;
                        color: #fff;
                    }
                }
                .noLeft{
                    margin-left: 0;
                }
            }
            .noTime{
                color: #666;
                text-align: center;
                margin-bottom: 1rem;
            }
            .delMaskName{
                font-size: 0.7rem;
                margin-bottom: 0.75rem;
            }
            .delCheckCont{
                .delCheckItem{
                    padding: 0.75rem;
                    box-sizing: border-box;
                    background-color: #f7f7f7;
                    border: 1px solid #f7f7f7;
                    margin-bottom: 0.75rem;
                    border-radius: 0.25rem;
                }
                .delActive{
                    border: 1px solid #6d94f8;
                    background-color: #d5e1fd;
                    color: #6d94f8;
                }
            }
            .couponTitle{
                font-weight: bold;
                font-size: 0.8rem;
            }
            .couponList{
                width: 100%;
                margin: 0.75rem 0;
                box-sizing: border-box;
                border-radius: 0.25rem;
                max-height: 15rem;
                overflow-y: auto;
                .couponItem{
                    width: 100%;
                    background-color: #f7f7f7;
                    // box-shadow: 0 0 10px #ebebeb;
                    border: 1px solid #ccc;
                    border-radius: 0.5rem;
                    margin-bottom: 0.75rem;
                    padding:0.75rem 0.75rem;
                    box-sizing: border-box;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    .couponLeft{
                        display: table-cell;
                        color: #6d94f8;
                        .couponPrice{
                            font-size: 1.2rem;
                            // font-weight: bold;
                        }
                    }
                    .couponRight{
                        color: #999;
                        font-size: 0.6rem;
                        .couponFull{
                            color: #333;
                        }
                    }
                    .checkBox{
                        width: 1rem;
                        height: 1rem;
                        // background-color: #ccc;
                        border-radius: 50%;
                        text-align: center;
                        line-height: 1rem;
                        font-size: 0.7rem;
                        // color: #999;
                        border: 1px solid #ccc;
                        color: #f7f7f7;
                    }
                    .isCheck{
                        background-color: #6d94f8;
                        color: white;
                        border: 1px solid #6d94f8;
                    }
                }
            }
          }
        }
        .flexCenter{
            align-items: center;
        }
        .noBorder{
          border-bottom: none;
        }
        .goodsItem{
            width: 100%;
            margin: 0 auto;
            padding: 0.75rem 0;
            box-sizing: border-box;
            background-color: #fff;
            margin-bottom: 1rem;
            display: flex;
            border-radius: 0.25rem;
            align-items: center;
            .goodsImg{
            width: 4rem;
            height: 4rem;
            overflow: hidden;
            border-radius: 0.25rem;
            margin-right: 0.5rem;
            img{
                width: 100%;
            }
            }
            .goodsInfo{
            width: 0.5rem;
            flex: 1;
            display: flex;
            flex-direction: column;
            height: 4rem;
            justify-content: space-between;
            .goodsName{
                width: 100%;
                line-height: 1rem;
                font-size: 0.7rem;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
            }
            .delivery_time{
                font-size: 0.6rem;
                color: #666;
            }
            .goodsType{
                display: flex;
                align-items: center;
                justify-content: space-between;
                .goodsNumCont{
                display: flex;
                height: 1rem;
                line-height: 1rem;
                color: #999;
                font-size: 0.6rem;
                align-items: center;
                }
                .goodsTypeItem{
                    padding:0.1rem 0.5rem;
                    background-color: #edf2ff;
                    font-size: 0.6rem;
                    height: 1rem;
                    line-height: 1rem;
                    border-radius: 0.75rem;
                    color: #6d94f8;
                }
            }
            .goodsInfoPrice{
                color: #999;
                display: flex;
                justify-content: space-between;
                font-size: 0.6rem;
                .serveTime{
                    display: flex;
                    align-items: center;
                    .iconfont{
                        margin-right: 0.25rem;
                    }
                }
            }
            }
        }
      }
    }
    .hasMargin{
        margin-top: 0.75rem;
    }
    
    .orderTip{
        width: 92%;
        margin: 0.75rem auto;
        font-size: 0.6rem;
        color: #666;
    }
    .ctrlCont{
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 4%;
        box-sizing: border-box;
        align-items: center;
        .sumCont{
        width: 0.5rem;
        flex: 1;
        margin-right: 0.75rem;
        color: #666;
        display: flex;
        font-size: 0.7rem;
        align-items: center;
        .sum_price{
          color:#6d94f8;
        }
        .oldPrice{
            text-decoration: line-through;
            color: #999;
            margin-left: 0.25rem;
            position: relative;
            top: 0.15rem;
        }
      }
        .rightBtn{
            padding: 0.6rem 1.5rem;
            background-color: #6d94f8;
            color: white;
            text-align: center;
            font-size: 0.6rem;
            border-radius: 0.25rem;
        }
    }
    .orderMask{
        padding: 0.75rem;
        box-sizing: border-box;
        .maskTitle{
        font-size: 0.8rem;
        font-weight: bold;
        text-align: center;
        }
        .maskTip{
        margin-top: 0.5rem;
        line-height: 1.1rem;
        }
    }
    .maskCont{
        padding: 1.5rem 4%;
        box-sizing: border-box;
        .maskHead{
            width: 100%;
            text-align: center;
            font-size: 1rem;
            font-weight: bold;
            margin-bottom: 1.5rem;
        }
        .maskBtn{
            width: 100%;
            text-align: center;
            padding: 0.75rem 0;
            background-color: #6d94f8;
            border: 1px solid #6d94f8;
            color: #fff;
            border-radius: 2rem;
            margin-top: 1.5rem;
        }
        .disMaskBtn{
            opacity: 0.5
        }
    }
  }
  </style>
  <style>
    .van-coupon-list__list{
        height: 20rem !important;
    }
    .container .van-picker__toolbar{
        display: none;
    }
</style>